#ifndef RAT_VECTOR3D_H
#define RAT_VECTOR3D_H

#include <cmath>
#include <iostream>

#include "RAT_Matrix33.h"

using RAT_ENGINE::RAT_Matrix33;

namespace RAT_ENGINE
{
	/// <summary>
	/// Structure for a three dimensional vector.
	/// Contains operators and functions for basic calculations.
	/// </summary>
	struct RAT_Vector3D
	{
		float x, y, z; // The attributes of the vector

		//Arithmic operators
		RAT_Vector3D operator+ (const RAT_Vector3D& argVector) const; //Vector-vector addition.
		RAT_Vector3D operator- (const RAT_Vector3D& argVector) const; //Vector-vector subtraction.
		RAT_Vector3D operator* (const RAT_Vector3D& argVector) const; //Vector-vector cross product.
		RAT_Vector3D operator* (const RAT_Matrix33& argMatrix) const; //Vector-vector with matrix multiplication
		RAT_Vector3D operator* (const float& argScale) const;		  //Vector-scalar multiplication.
		RAT_Vector3D operator/ (const float& argScale) const;		  //Vector-scalar division.

		//Compound assignment operators
		RAT_Vector3D operator+= (const RAT_Vector3D& argVector) const; //Vector-vector addition.
		RAT_Vector3D operator-= (const RAT_Vector3D& argVector) const; //Vector-vector subtraction.
		RAT_Vector3D operator*= (const RAT_Vector3D& argVector) const; //Vector-vector cross product.
		RAT_Vector3D operator*= (const RAT_Matrix33& argMatrix) const; //Vector-vector with matrix multiplication
		RAT_Vector3D operator*= (const float& argScale) const;		   //Vector-scalar multiplication.
		RAT_Vector3D operator/= (const float& argScale) const;		   //Vector-scalar division

		//Relational operators
		bool operator== (const RAT_Vector3D& argVector) const; //Vector-vector comparison
		bool operator!= (const RAT_Vector3D& argVector) const; //Vector-vector comparison

		//Calculation functions
		float DotProduct(const RAT_Vector3D& argVector) const; //Calculates the dot product of two vectors.
		RAT_Vector3D HadamardProduct(const RAT_Vector3D& argScaleVector) const; //Scales the vector differently over each axis.
		float SquaredMagnitude() const; //Calculates the squared magnitude of the vector.
		float Magnitude() const; //Calculates the magnitude of the vector.
		RAT_Vector3D LERP(const RAT_Vector3D& argVector, const float& argPoint) const; //Calculates a point between two vectors.

		//Printers
		void PrintIO() const;
	};							   
}								   

#endif